package com.ruoyi.orderadmin.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.orderadmin.mapper.OaShopDetailMapper;
import com.ruoyi.orderadmin.service.IOaShopDetailService;
import com.ruoyi.orderadmin.domain.OaShopDetail;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Value;
import com.ruoyi.common.core.page.PageDomain;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.useradmin.domain.UaUser;
import com.ruoyi.useradmin.service.IUaUserService;
import com.ruoyi.orderadmin.service.IOaOrderService;
import com.ruoyi.orderadmin.service.IOaShopService;
import com.ruoyi.campadmin.service.ICaAmenityService;
import com.ruoyi.campadmin.service.ICaItemRentalService;
import com.ruoyi.campadmin.service.ICaItemSaleService;
import com.ruoyi.campadmin.service.ICaVenueRentalService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.Map;

/**
 * @Description  
 * @Author kemonvvv
 * @Date 2023-06-07 
 */
@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class OaShopDetailServiceImpl implements IOaShopDetailService {


    @Resource
    private OaShopDetailMapper oaShopDetailMapper;
    
    
    @Resource
    private IUaUserService uaUserService;

    //购物订单详情表类型[1购物车/2订单]
    //1购物车
    @Resource
    private IOaShopService oaShopService;
    //2订单
    @Resource
    private IOaOrderService oaOrderService;

    //购物类型[1场地租赁/2单品租赁/3单品售卖/4设施]
    //1场地租赁
    @Resource
    private ICaVenueRentalService caVenueRentalService;
    //2单品租赁
    @Resource
    private ICaItemRentalService caItemRentalService;
    //3单品售卖
    @Resource
    private ICaItemSaleService caItemSaleService;
    //4设施
    @Resource
    private ICaAmenityService caAmenityService;


    
    
    /**
     * 全查询
     * 
     * @param pageDomain 分页信息
     * @param oaShopDetail 要查询的实体类
     * @return 结果
     */
    @Override
    public Page<OaShopDetail> getOaShopDetailPage(PageDomain pageDomain, OaShopDetail oaShopDetail) {
        if (Objects.isNull(oaShopDetail)) {
            return new Page<>();
        }
        try {
            LambdaQueryWrapper<OaShopDetail> queryWrapper = new LambdaQueryWrapper<>(new OaShopDetail());
            //if(!Objects.isNull(oaShopDetail.getName())){
            //	queryWrapper.like(OaShopDetail::getName,oaShopDetail.getName());
            //}
            

            if (!Objects.isNull(oaShopDetail.getId())) {
                queryWrapper.eq(OaShopDetail::getId, oaShopDetail.getId());
            }

            if (!Objects.isNull(oaShopDetail.getUaUserId())) {
                queryWrapper.eq(OaShopDetail::getUaUserId, oaShopDetail.getUaUserId());
            }

            if (!Objects.isNull(oaShopDetail.getOaShopDetailType())) {
                queryWrapper.like(OaShopDetail::getOaShopDetailType, oaShopDetail.getOaShopDetailType());
            }

            if (!Objects.isNull(oaShopDetail.getOaShopDetailTypeId())) {
                queryWrapper.eq(OaShopDetail::getOaShopDetailTypeId, oaShopDetail.getOaShopDetailTypeId());
            }

            if (!Objects.isNull(oaShopDetail.getParams().get("StartTimeBeginTime"))||!Objects.isNull(oaShopDetail.getParams().get("StartTimeEndTime"))) {
                if (Objects.isNull(oaShopDetail.getParams().get("StartTimeBeginTime"))){
                    queryWrapper.lt(OaShopDetail::getStartTime, oaShopDetail.getParams().get("StartTimeEndTime"));
                }
                if (Objects.isNull(oaShopDetail.getParams().get("StartTimeEndTime"))){
                    queryWrapper.gt(OaShopDetail::getStartTime, oaShopDetail.getParams().get("StartTimeBeginTime"));
                }
                if (!Objects.isNull(oaShopDetail.getParams().get("StartTimeBeginTime")) && !Objects.isNull(oaShopDetail.getParams().get("StartTimeEndTime"))) {
                    queryWrapper.between(OaShopDetail::getStartTime, oaShopDetail.getParams().get("StartTimeBeginTime"), oaShopDetail.getParams().get("StartTimeEndTime"));
                }
            }

            if (!Objects.isNull(oaShopDetail.getParams().get("OverTimeBeginTime"))||!Objects.isNull(oaShopDetail.getParams().get("OverTimeEndTime"))) {
                if (Objects.isNull(oaShopDetail.getParams().get("OverTimeBeginTime"))){
                    queryWrapper.lt(OaShopDetail::getOverTime, oaShopDetail.getParams().get("OverTimeEndTime"));
                }
                if (Objects.isNull(oaShopDetail.getParams().get("OverTimeEndTime"))){
                    queryWrapper.gt(OaShopDetail::getOverTime, oaShopDetail.getParams().get("OverTimeBeginTime"));
                }
                if (!Objects.isNull(oaShopDetail.getParams().get("OverTimeBeginTime")) && !Objects.isNull(oaShopDetail.getParams().get("OverTimeEndTime"))) {
                    queryWrapper.between(OaShopDetail::getOverTime, oaShopDetail.getParams().get("OverTimeBeginTime"), oaShopDetail.getParams().get("OverTimeEndTime"));
                }
            }

            if (!Objects.isNull(oaShopDetail.getShopType())) {
                queryWrapper.like(OaShopDetail::getShopType, oaShopDetail.getShopType());
            }

            if (!Objects.isNull(oaShopDetail.getShopTypeId())) {
                queryWrapper.eq(OaShopDetail::getShopTypeId, oaShopDetail.getShopTypeId());
            }

            if (!Objects.isNull(oaShopDetail.getPurchasesNum())) {
                queryWrapper.like(OaShopDetail::getPurchasesNum, oaShopDetail.getPurchasesNum());
            }

            if (!Objects.isNull(oaShopDetail.getPayState())) {
                queryWrapper.like(OaShopDetail::getPayState, oaShopDetail.getPayState());
            }

            if (!Objects.isNull(oaShopDetail.getOrderState())) {
                queryWrapper.like(OaShopDetail::getOrderState, oaShopDetail.getOrderState());
            }

            if (!Objects.isNull(oaShopDetail.getStatus())) {
                queryWrapper.like(OaShopDetail::getStatus, oaShopDetail.getStatus());
            }

            if (!Objects.isNull(oaShopDetail.getDelFlag())) {
                queryWrapper.like(OaShopDetail::getDelFlag, oaShopDetail.getDelFlag());
            }

            if (!Objects.isNull(oaShopDetail.getCreateBy())) {
                queryWrapper.like(OaShopDetail::getCreateBy, oaShopDetail.getCreateBy());
            }

            if (!Objects.isNull(oaShopDetail.getParams().get("CreateTimeBeginTime"))||!Objects.isNull(oaShopDetail.getParams().get("CreateTimeEndTime"))) {
                if (Objects.isNull(oaShopDetail.getParams().get("CreateTimeBeginTime"))){
                    queryWrapper.lt(OaShopDetail::getCreateTime, oaShopDetail.getParams().get("CreateTimeEndTime"));
                }
                if (Objects.isNull(oaShopDetail.getParams().get("CreateTimeEndTime"))){
                    queryWrapper.gt(OaShopDetail::getCreateTime, oaShopDetail.getParams().get("CreateTimeBeginTime"));
                }
                if (!Objects.isNull(oaShopDetail.getParams().get("CreateTimeBeginTime")) && !Objects.isNull(oaShopDetail.getParams().get("CreateTimeEndTime"))) {
                    queryWrapper.between(OaShopDetail::getCreateTime, oaShopDetail.getParams().get("CreateTimeBeginTime"), oaShopDetail.getParams().get("CreateTimeEndTime"));
                }
            }

            if (!Objects.isNull(oaShopDetail.getUpdateBy())) {
                queryWrapper.like(OaShopDetail::getUpdateBy, oaShopDetail.getUpdateBy());
            }

            if (!Objects.isNull(oaShopDetail.getParams().get("UpdateTimeBeginTime"))||!Objects.isNull(oaShopDetail.getParams().get("UpdateTimeEndTime"))) {
                if (Objects.isNull(oaShopDetail.getParams().get("UpdateTimeBeginTime"))){
                    queryWrapper.lt(OaShopDetail::getUpdateTime, oaShopDetail.getParams().get("UpdateTimeEndTime"));
                }
                if (Objects.isNull(oaShopDetail.getParams().get("UpdateTimeEndTime"))){
                    queryWrapper.gt(OaShopDetail::getUpdateTime, oaShopDetail.getParams().get("UpdateTimeBeginTime"));
                }
                if (!Objects.isNull(oaShopDetail.getParams().get("UpdateTimeBeginTime")) && !Objects.isNull(oaShopDetail.getParams().get("UpdateTimeEndTime"))) {
                    queryWrapper.between(OaShopDetail::getUpdateTime, oaShopDetail.getParams().get("UpdateTimeBeginTime"), oaShopDetail.getParams().get("UpdateTimeEndTime"));
                }
            }

            if (!Objects.isNull(oaShopDetail.getRemark())) {
                queryWrapper.like(OaShopDetail::getRemark, oaShopDetail.getRemark());
            }
        Page<OaShopDetail> oaShopDetailList= oaShopDetailMapper.selectPage(pageDomain.getPage(), queryWrapper);
        for(OaShopDetail record:oaShopDetailList.getRecords()){
            record.setUaUser(uaUserService.getUaUserById(record.getUaUserId()));
            //购物订单详情表类型[1购物车/2订单]
            switch (record.getOaShopDetailType()){
                case "1":
                    record.setOaShop(oaShopService.getOaShopById(record.getOaShopDetailTypeId()));
                    break;
                case "2":
                    record.setOaOrder(oaOrderService.getOaOrderById(record.getOaShopDetailTypeId()));
                    break;
            }
            //购物类型[1场地租赁/2单品租赁/3单品售卖/4设施]
            switch (record.getShopType()){
                case "1":
                    record.setCaVenueRental(caVenueRentalService.getCaVenueRentalById(record.getShopTypeId()));
                    break;
                case "2":
                    record.setCaItemRental(caItemRentalService.getCaItemRentalById(record.getShopTypeId()));
                    break;
                case "3":
                    record.setCaItemSale(caItemSaleService.getCaItemSaleById(record.getShopTypeId()));
                    break;
                case "4":
                    record.setCaAmenity(caAmenityService.getCaAmenityById(record.getShopTypeId()));
                    break;
            }
        }

            return oaShopDetailList;
        } catch (Exception e) {
            e.printStackTrace();
            return new Page<>();
        }
    }
    

    
    /**
     * 查询通过id
     * 
     * @param id 实体类的主键
     * @return 结果
     */
    @Override
    public OaShopDetail getOaShopDetailById(Long id) {
        if (Objects.isNull(id)) {
            return new OaShopDetail();
        }
        try {
            OaShopDetail oaShopDetail = oaShopDetailMapper.selectById(id);
            oaShopDetail.setUaUser(uaUserService.getUaUserById(oaShopDetail.getUaUserId()));
        //购物订单详情表类型[1购物车/2订单]
            switch (oaShopDetail.getOaShopDetailType()){
                case "1":
                    oaShopDetail.setOaShop(oaShopService.getOaShopById(oaShopDetail.getOaShopDetailTypeId()));
                    break;
                case "2":
                    oaShopDetail.setOaOrder(oaOrderService.getOaOrderById(oaShopDetail.getOaShopDetailTypeId()));
                    break;
            }
            //购物类型[1场地租赁/2单品租赁/3单品售卖/4设施]
            switch (oaShopDetail.getShopType()){
                case "1":
                    oaShopDetail.setCaVenueRental(caVenueRentalService.getCaVenueRentalById(oaShopDetail.getShopTypeId()));
                    break;
                case "2":
                    oaShopDetail.setCaItemRental(caItemRentalService.getCaItemRentalById(oaShopDetail.getShopTypeId()));
                    break;
                case "3":
                    oaShopDetail.setCaItemSale(caItemSaleService.getCaItemSaleById(oaShopDetail.getShopTypeId()));
                    break;
                case "4":
                    oaShopDetail.setCaAmenity(caAmenityService.getCaAmenityById(oaShopDetail.getShopTypeId()));
                    break;
            }
            if (Objects.isNull(oaShopDetail)){
                oaShopDetail = new OaShopDetail();
            }
            return oaShopDetail;

        } catch (Exception e) {
            e.printStackTrace();
            return new OaShopDetail();
        }
    }


    
    
    /**
     * 通过类查询的属性值 id列表
     * 
     * @param oaShopDetail 要查询的实体类
     * @return 结果
     */
    @Override
    public List<Long> getIdListByOaShopDetail(OaShopDetail oaShopDetail) {
        if (Objects.isNull(oaShopDetail)) {
            return new ArrayList<>();
        }
        try {
            LambdaQueryWrapper<OaShopDetail> queryWrapper = new LambdaQueryWrapper<>(new OaShopDetail());
            

            if (!Objects.isNull(oaShopDetail.getId())) {
                queryWrapper.eq(OaShopDetail::getId, oaShopDetail.getId());
            }

            if (!Objects.isNull(oaShopDetail.getUaUserId())) {
                queryWrapper.eq(OaShopDetail::getUaUserId, oaShopDetail.getUaUserId());
            }

            if (!Objects.isNull(oaShopDetail.getOaShopDetailType())) {
                queryWrapper.like(OaShopDetail::getOaShopDetailType, oaShopDetail.getOaShopDetailType());
            }

            if (!Objects.isNull(oaShopDetail.getOaShopDetailTypeId())) {
                queryWrapper.eq(OaShopDetail::getOaShopDetailTypeId, oaShopDetail.getOaShopDetailTypeId());
            }

            if (!Objects.isNull(oaShopDetail.getParams().get("StartTimeBeginTime"))||!Objects.isNull(oaShopDetail.getParams().get("StartTimeEndTime"))) {
                if (Objects.isNull(oaShopDetail.getParams().get("StartTimeBeginTime"))){
                    queryWrapper.lt(OaShopDetail::getStartTime, oaShopDetail.getParams().get("StartTimeEndTime"));
                }
                if (Objects.isNull(oaShopDetail.getParams().get("StartTimeEndTime"))){
                    queryWrapper.gt(OaShopDetail::getStartTime, oaShopDetail.getParams().get("StartTimeBeginTime"));
                }
                if (!Objects.isNull(oaShopDetail.getParams().get("StartTimeBeginTime")) && !Objects.isNull(oaShopDetail.getParams().get("StartTimeEndTime"))) {
                    queryWrapper.between(OaShopDetail::getStartTime, oaShopDetail.getParams().get("StartTimeBeginTime"), oaShopDetail.getParams().get("StartTimeEndTime"));
                }
            }

            if (!Objects.isNull(oaShopDetail.getParams().get("OverTimeBeginTime"))||!Objects.isNull(oaShopDetail.getParams().get("OverTimeEndTime"))) {
                if (Objects.isNull(oaShopDetail.getParams().get("OverTimeBeginTime"))){
                    queryWrapper.lt(OaShopDetail::getOverTime, oaShopDetail.getParams().get("OverTimeEndTime"));
                }
                if (Objects.isNull(oaShopDetail.getParams().get("OverTimeEndTime"))){
                    queryWrapper.gt(OaShopDetail::getOverTime, oaShopDetail.getParams().get("OverTimeBeginTime"));
                }
                if (!Objects.isNull(oaShopDetail.getParams().get("OverTimeBeginTime")) && !Objects.isNull(oaShopDetail.getParams().get("OverTimeEndTime"))) {
                    queryWrapper.between(OaShopDetail::getOverTime, oaShopDetail.getParams().get("OverTimeBeginTime"), oaShopDetail.getParams().get("OverTimeEndTime"));
                }
            }

            if (!Objects.isNull(oaShopDetail.getShopType())) {
                queryWrapper.like(OaShopDetail::getShopType, oaShopDetail.getShopType());
            }

            if (!Objects.isNull(oaShopDetail.getShopTypeId())) {
                queryWrapper.eq(OaShopDetail::getShopTypeId, oaShopDetail.getShopTypeId());
            }

            if (!Objects.isNull(oaShopDetail.getPurchasesNum())) {
                queryWrapper.like(OaShopDetail::getPurchasesNum, oaShopDetail.getPurchasesNum());
            }

            if (!Objects.isNull(oaShopDetail.getPayState())) {
                queryWrapper.like(OaShopDetail::getPayState, oaShopDetail.getPayState());
            }

            if (!Objects.isNull(oaShopDetail.getOrderState())) {
                queryWrapper.like(OaShopDetail::getOrderState, oaShopDetail.getOrderState());
            }

            if (!Objects.isNull(oaShopDetail.getStatus())) {
                queryWrapper.like(OaShopDetail::getStatus, oaShopDetail.getStatus());
            }

            if (!Objects.isNull(oaShopDetail.getDelFlag())) {
                queryWrapper.like(OaShopDetail::getDelFlag, oaShopDetail.getDelFlag());
            }

            if (!Objects.isNull(oaShopDetail.getCreateBy())) {
                queryWrapper.like(OaShopDetail::getCreateBy, oaShopDetail.getCreateBy());
            }

            if (!Objects.isNull(oaShopDetail.getParams().get("CreateTimeBeginTime"))||!Objects.isNull(oaShopDetail.getParams().get("CreateTimeEndTime"))) {
                if (Objects.isNull(oaShopDetail.getParams().get("CreateTimeBeginTime"))){
                    queryWrapper.lt(OaShopDetail::getCreateTime, oaShopDetail.getParams().get("CreateTimeEndTime"));
                }
                if (Objects.isNull(oaShopDetail.getParams().get("CreateTimeEndTime"))){
                    queryWrapper.gt(OaShopDetail::getCreateTime, oaShopDetail.getParams().get("CreateTimeBeginTime"));
                }
                if (!Objects.isNull(oaShopDetail.getParams().get("CreateTimeBeginTime")) && !Objects.isNull(oaShopDetail.getParams().get("CreateTimeEndTime"))) {
                    queryWrapper.between(OaShopDetail::getCreateTime, oaShopDetail.getParams().get("CreateTimeBeginTime"), oaShopDetail.getParams().get("CreateTimeEndTime"));
                }
            }

            if (!Objects.isNull(oaShopDetail.getUpdateBy())) {
                queryWrapper.like(OaShopDetail::getUpdateBy, oaShopDetail.getUpdateBy());
            }

            if (!Objects.isNull(oaShopDetail.getParams().get("UpdateTimeBeginTime"))||!Objects.isNull(oaShopDetail.getParams().get("UpdateTimeEndTime"))) {
                if (Objects.isNull(oaShopDetail.getParams().get("UpdateTimeBeginTime"))){
                    queryWrapper.lt(OaShopDetail::getUpdateTime, oaShopDetail.getParams().get("UpdateTimeEndTime"));
                }
                if (Objects.isNull(oaShopDetail.getParams().get("UpdateTimeEndTime"))){
                    queryWrapper.gt(OaShopDetail::getUpdateTime, oaShopDetail.getParams().get("UpdateTimeBeginTime"));
                }
                if (!Objects.isNull(oaShopDetail.getParams().get("UpdateTimeBeginTime")) && !Objects.isNull(oaShopDetail.getParams().get("UpdateTimeEndTime"))) {
                    queryWrapper.between(OaShopDetail::getUpdateTime, oaShopDetail.getParams().get("UpdateTimeBeginTime"), oaShopDetail.getParams().get("UpdateTimeEndTime"));
                }
            }

            if (!Objects.isNull(oaShopDetail.getRemark())) {
                queryWrapper.like(OaShopDetail::getRemark, oaShopDetail.getRemark());
            }

            List<OaShopDetail> oaShopDetails = oaShopDetailMapper.selectList(queryWrapper);
            List<Long> idList = new ArrayList<>();
            for (OaShopDetail oaShopDetailNo:oaShopDetails){
                idList.add(oaShopDetailNo.getId());
            }
            return idList;
        } catch (Exception e) {
            e.printStackTrace();
            return new ArrayList<>();
        }
    }


    /**
     * 通过uaUser外键idList查询idList
     *
     * @param uaUserIdList 要查询的实体类
     * @return 结果
     **/
    public List<Long> getIdListByUaUserIdList(List<Long> uaUserIdList) {
        if (Objects.isNull(uaUserIdList)){
            return  new ArrayList<>();
        }
        try{
            LambdaQueryWrapper<OaShopDetail> queryWrapper = new LambdaQueryWrapper<>(new OaShopDetail());
            queryWrapper.in(OaShopDetail::getUaUserId, uaUserIdList);
            List<OaShopDetail> oaShopDetails = oaShopDetailMapper.selectList(queryWrapper);
            List<Long> idList = new ArrayList<>();
            for (OaShopDetail oaShopDetail:oaShopDetails){
                idList.add(oaShopDetail.getId());
            }
            return idList;
        }catch (Exception e){
            return new ArrayList<>();
        }
    }


    /**
     * 通过oaShopDetailType外键idList查询idList
     *
     * @param oaShopDetailTypeIdList 要查询的实体类
     * @return 结果
     **/
    public List<Long> getIdListByOaShopDetailTypeIdList(List<Long> oaShopDetailTypeIdList) {
        if (Objects.isNull(oaShopDetailTypeIdList)){
            return  new ArrayList<>();
        }
        try{
            LambdaQueryWrapper<OaShopDetail> queryWrapper = new LambdaQueryWrapper<>(new OaShopDetail());
            queryWrapper.in(OaShopDetail::getOaShopDetailTypeId, oaShopDetailTypeIdList);
            List<OaShopDetail> oaShopDetails = oaShopDetailMapper.selectList(queryWrapper);
            List<Long> idList = new ArrayList<>();
            for (OaShopDetail oaShopDetail:oaShopDetails){
                idList.add(oaShopDetail.getId());
            }
            return idList;
        }catch (Exception e){
            return new ArrayList<>();
        }
    }


    /**
     * 通过shopType外键idList查询idList
     *
     * @param shopTypeIdList 要查询的实体类
     * @return 结果
     **/
    public List<Long> getIdListByShopTypeIdList(List<Long> shopTypeIdList) {
        if (Objects.isNull(shopTypeIdList)){
            return  new ArrayList<>();
        }
        try{
            LambdaQueryWrapper<OaShopDetail> queryWrapper = new LambdaQueryWrapper<>(new OaShopDetail());
            queryWrapper.in(OaShopDetail::getShopTypeId, shopTypeIdList);
            List<OaShopDetail> oaShopDetails = oaShopDetailMapper.selectList(queryWrapper);
            List<Long> idList = new ArrayList<>();
            for (OaShopDetail oaShopDetail:oaShopDetails){
                idList.add(oaShopDetail.getId());
            }
            return idList;
        }catch (Exception e){
            return new ArrayList<>();
        }
    }

    
    /**
     * 添加
     * 
     * @param oaShopDetail 要添加的实体类
     * @return 结果
     */
    @Override
    public int insertOaShopDetail(OaShopDetail oaShopDetail) {
        if (Objects.isNull(oaShopDetail)) {
            return -1;
        }
        try {
        
            //oaShopDetail.setSpell(PinYin.getPinYin(oaShopDetail.getName()));
            return oaShopDetailMapper.insert(oaShopDetail);
        } catch (Exception e) {
            return -1;
        }
    }

    /**
     * 更新通过id进行更新一条
     * 
     * @param oaShopDetail 实体类
     * @return 结果
     */
    @Override
    public int updateOaShopDetailById(OaShopDetail oaShopDetail) {
        if (Objects.isNull(oaShopDetail)) {
            return -1;
        }
        try {
            //oaShopDetail.setSpell(PinYin.getPinYin(oaShopDetail.getName()));
            return oaShopDetailMapper.updateById(oaShopDetail);
        } catch (Exception e) {
            return -1;
        }
    }
    
    /**
     * 删除通过id集合
     * 
     * @param idList id集合
     * @return 结果
     */
    @Override
    public int deleteOaShopDetailByIdList(List idList){
        if (Objects.isNull(idList)) {
            return -1;
        }
        try {
            return oaShopDetailMapper.deleteBatchIds(idList);
        } catch (Exception e) {
            return -1;
        }
    }
    
    /**
     * 查询无条件全部 用于导出
     * 
     * @return 结果
     */
    @Override
    public List<OaShopDetail> getOaShopDetailList() {
        try {
            LambdaQueryWrapper<OaShopDetail> queryWrapper = new LambdaQueryWrapper<>(new OaShopDetail());
            queryWrapper.isNotNull(OaShopDetail::getId);
            return oaShopDetailMapper.selectList(queryWrapper);
        } catch (Exception e) {
            e.printStackTrace();
            return new ArrayList<>();
        }
    }

}
